package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 暂时定义的报表类型枚举
 * @Date : 2021/9/26 20:30
 * @Modified by : zjf
 */
public enum ReportIdType {
    //电表报表
    METER("meter", "电表报表"),
    //BMU报表
    BMU("bmu", "BMU报表"),
    //电价报表
    INCOME("income", "电价报表"),
    //上下网电量
    ON_OFF_GRID_ENERGY("onOffGird","上下网电网报表")
    ;

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    ReportIdType(String code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(String code){
        for(ReportIdType type: ReportIdType.values()){
            if(type.getCode().equals(code)){
                return type.getDesc();
            }
        }
        return null;
    }

}
